<?php

namespace common\models\notice;

use Yii;
use yii\behaviors\TimestampBehavior;
/**
 * This is the model class for table "notice".
 *
 * @property integer $id
 * @property string $title
 * @property string $content
 * @property integer $time
 * @property integer $created_at
 * @property integer $updated_at
 * @property integer $status
 * @property integer $num
 */
class Notice extends \yii\db\ActiveRecord
{
    public function behaviors()
    {
        return [
            [
                'class' => TimestampBehavior::className(),
            ],
        ];
    }
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'notice';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['content'], 'string'],
            [['time', ], 'string'],
            [['title'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'title' => Yii::t('app', '标题'),
            'content' => Yii::t('app', '内容'),
            'time' => Yii::t('app', '时间'),
            'created_at' => Yii::t('app', 'Created At'),
            'updated_at' => Yii::t('app', 'Updated At'),
            'status' => Yii::t('app', 'Status'),
            'num' => Yii::t('app', 'Num'),
        ];
    }
}
